GtkMenu: Add a separate style class to the toplevel of menus
authorMatthias Clasen <mclasen@redhat.com>
Fri, 6 Jun 2014 23:06:15 +0000 (19:06 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 9 Jun 2014 18:14:48 +0000 (14:14 -0400)
This is necessary in order to use .window-frame.csd.popup for
styling csd menus.

https://bugzilla.gnome.org/show_bug.cgi?id=731187

gtk/gtkmenu.c

index f1bf2436fac04b944c9ad58c272c2f4f63478afc..cb8d98e641036ca18e2a7e2e58595c35b63c52c3 100644 (file)
@@ -1099,6 +1099,8 @@ gtk_menu_init (GtkMenu *menu)
   gtk_window_set_resizable (GTK_WINDOW (priv->toplevel), FALSE);
   gtk_window_set_mnemonic_modifier (GTK_WINDOW (priv->toplevel), 0);
 
+  gtk_style_context_add_class (gtk_widget_get_style_context (priv->toplevel), "popup");
+
   /* Refloat the menu, so that reference counting for the menu isn't
    * affected by it being a child of the toplevel
    */